package com.bph.schedule.mapper;

import com.bph.commons.pojo.Message;
import com.bph.commons.pojo.User;
import com.bph.commons.pojo.User_Preference;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@Mapper
public interface ScheduleMapper {
    /**
     * 得到该员工的所有排班信息
     * @param
     * @return
     */
    public List<Message> selectEmployeeListByUserId(String user_id);

    /**
     * 查找message_id,message_startTime,message_finishTime,employeeList列
     * @return
     */
    public List<Message> selectMessage();

    /**
     * 根据user_id查找user_id,user_name,user_sex，存入Map中
     * @param user_id
     * @return
     */
    public Map getUserByUserId(int user_id);




    //获取指定月份的客流预测数据
    List<LinkedHashMap<String,Object>> getCustomerFlowByStoreId(@Param("store_id") int store_id,@Param("month") String month);

    //获取门店的员工基本信息
    List<User> getUserByStoreId(int store_id);

    //获取员工的偏好
    List<User_Preference> getUPreferenceByUid(int user_id);

    //排班信息写入数据库
    int addScheduleByStoreId(@Param("users") String employeeList, @Param("time") String start_time);
}
